﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SchoolProject2012.Areas.Admin.Models;

namespace SchoolProject2012.Areas.Admin.Controllers
{
    [Authorize(Roles = "Admin")]
    public class HomeController : Controller
    {
        private SchoolProjectBddEntities2 db = new SchoolProjectBddEntities2();

        //
        // GET: /Admin/Home/
        [Authorize(Roles = "Admin")]
        public ActionResult Index()
        {
            var eleve = db.ELEVE.Include("CHARGEDEPLACEMENT");
            return View(eleve.ToList());
        }

        public EmptyResult ExportDB()
        {
            Functions.Security.exporter(db);
            return null;
        }
    }
}